package com.company.huisuo.biz.adapter

import androidx.appcompat.app.AppCompatActivity
import androidx.fragment.app.Fragment
import androidx.viewpager2.adapter.FragmentStateAdapter
import com.company.huisuo.biz.fragment.ArtistRankFragment
import com.company.huisuo.biz.fragment.ArtistShowListFragment

/**
 * 艺人推荐ViewPager适配器
 */
class ArtistRecommendViewPagerAdapter(activity: AppCompatActivity) : FragmentStateAdapter(activity) {

    override fun getItemCount(): Int {
        return 2
    }

    override fun createFragment(position: Int): Fragment {
        return if (position == 0) {
            ArtistRankFragment.newInstance()
        } else {
            ArtistShowListFragment.newInstance()
        }
    }
}
